import 'dart:convert';

import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/work_tool_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/work_tool_entity.g.dart';

///作业工具
@JsonSerializable()
class WorkToolEntity implements ChoiceBean {
  WorkToolEntity();

  factory WorkToolEntity.fromJson(Map<String, dynamic> json) => $WorkToolEntityFromJson(json);

  ///	绑定状态 1-未绑定 2-已绑定
  int? bindStatus = 0;

  ///	企业编码
  String? companyCode = '';

  ///	创建人
  String? createBy = '';

  ///	创建时间
  String? createDate = '';

  ///	主键ID
  String? id = '';

  ///	辨识结果id集合
  List<String>? ids = [];

  ///	修改人
  String? updateBy = '';

  /// 修改时间
  String? updateDate = '';

  ///	作业工具
  String? workTool = '';

  ///	作业8大类型id
  String? workTypeId = '';

  /// 作业8大类型名称
  String? workTypeName = '';

  /// 是否选中
  bool isChecked = false;

  Map<String, dynamic> toJson() => $WorkToolEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id!;
  }

  @override
  bool getIsChecked() {
    return isChecked;
  }

  @override
  String getShowName() {
    return workTool!;
  }

  @override
  setIsChecked(bool isChecked) {
    this.isChecked = isChecked;
  }
}
